/**
 * 
 */
package com.cea.papyrus.multidiagram.extension;

import org.eclipse.core.runtime.IConfigurationElement;

/**
 * Base class of extension exceptions
 * @author dumoulin
 *
 */
public class ExtensionException extends Exception {

    /**
     * 
     */
    public ExtensionException() {
    }

    /**
     * @param message
     */
    public ExtensionException(String message) {
        super(message);
    }

    /**
     * @param cause
     */
    public ExtensionException(Throwable cause) {
        super(cause);

    }

    /**
     * @param message
     * @param cause
     */
    public ExtensionException(String message, Throwable cause) {
        super(message, cause);
    }

    /**
     * Return the name of the plugin and extension declaring the extension.
     * @param element
     * @return
     */
    protected static String declaringExtensionToString(IConfigurationElement element) {
        return "plugin:" + element.getContributor().getName() +" extension:"+ element.getName();
    }

    
}
